#include "../Require/Init.iss"
function main()
{
	extension -require isxeq2
	declare atype string local
	;EA "Loading" "Scan.iss"
	if ${NextTarget} != 0
	{
		if ${Actor[${NextTarget}](exists)}
		{
			atype:Set[${Actor[${NextTarget}].Type}]
			switch ${atype}
			{
				case chest
				case corpse
					call Loot
					break
				case resource
					call Harvest
					break
				case npc
				case namednpc
					call Fight
					break
			}
		}
	}
}
function atexit()
{
	;VirtualState:Set[ROAM]
	;EA "Unloading" "Scan.iss"
}